﻿<%@ Page Language="C#" MasterPageFile="~/WebShop.master" AutoEventWireup="true" CodeFile="Stall_v1.aspx.cs" Inherits="Shopping_Stall_Stall_v1" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <link rel="stylesheet" type="text/css" href="<%= ResolveClientUrl("~/")%>Pub/Css/JQ/zoomimage.css" />
    <script language="javascript" type="text/javascript" src="<%= ResolveClientUrl("~/")%>Pub/Js/JQ/eye.js"></script>
    <script language="javascript" type="text/javascript" src="<%= ResolveClientUrl("~/")%>Pub/Js/JQ/utils.js"></script>
    <script language="javascript" type="text/javascript" src="<%= ResolveClientUrl("~/")%>Pub/Js/JQ/zoomimage.js"></script>
    <script language="javascript" type="text/javascript" src="<%= ResolveClientUrl("~/")%>Pub/Js/JQ/layoutZoom.js">
    </script>

    <table border="0" cellpadding="0" cellspacing="0" width="100%" class="tbl_News">
        <tr>
            <td>
                <table border="0" width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td class="td_Left_TitileNews">
                        </td>
                        <td class="td_Middle_TitileNews">
                        </td>
                        <td class="td_Right_TitileNews">
                        </td>
                    </tr>
                    <tr>
                        <td class="td_Content_Left_590">
                        </td>
                        <td>
                            <table width="100%" class="tbl_ContentNews" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td align="center" height="40px" valign="middle">
                                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                            <tr>
                                                <td class="td_Middle_L">
                                                </td>
                                                <td class="td_Middle_C" align="center">
                                                    <asp:Label ID="lblKind" runat="server" CssClass="lbl_TitileNews_590"></asp:Label>
                                                    <asp:Label CssClass="lbl_Common" ID="lblEmpty" runat="server" Text="Hiện tại sản phẩm chưa được cập nhật. Vui lòng quay lại sau..."
                                                        Visible="false"></asp:Label>
                                                </td>
                                                <td class="td_Middle_R">
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <table width="100%" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td align="center" nowrap="nowrap" style="background-color: White">
                                                    <div id="thumbnail" style="background-color: White">
                                                        <asp:DataList ID="dtlThumbnail" runat="server" RepeatDirection="Horizontal" Width="100%"
                                                            BorderWidth="0px" DataKeyField="PdID" CellPadding="0" CellSpacing="0" OnItemDataBound="dtlThumbnail_ItemDataBound"
                                                            OnItemCommand="dtlThumbnail_ItemCommand" RepeatColumns="4">
                                                            <ItemStyle Wrap="False" />
                                                            <ItemTemplate>
                                                                <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;" class="tbl_line"
                                                                    onmouseover="this.style.backgroundImage='url(../../Images/Body/HNB.JPG)'" onmouseout="this.style.backgroundImage=''">
                                                                    <tr>
                                                                        <td class="td_line-x" colspan="3" runat="server" id="td_top" visible="false">
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="td_line-y" id="td_left" runat="server" visible="false">
                                                                        </td>
                                                                        <td style="vertical-align: top">
                                                                            <a name="PageIndex_<%# Eval("PDID").ToString().Trim() %>"></a>
                                                                            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%;" class="tbl_Product">
                                                                                <tr>
                                                                                    <td align="left" colspan="1" nowrap="nowrap">
                                                                                        <asp:Label ID="lblMaSP" Visible="false" runat="server" Text='<%# Eval("PDID") %>'></asp:Label>&nbsp;</td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td align="center" nowrap="nowrap" class="td_ImgProduct" valign="top">
                                                                                         <asp:Literal ID="ltlImages" runat="server"></asp:Literal>
                                                                                    </td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td align="left" colspan="1" nowrap="nowrap" valign="top">
                                                                                        <table width="100%" cellpadding="0" cellspacing="0">
                                                                                            <tr>
                                                                                                <td valign="top" align="center">
                                                                                                    <a href="ProductDetail.aspx?PDID=<%# Eval("PDID")  %>" class="lbl_MostTitleProduct"
                                                                                                        style="cursor: pointer">
                                                                                                        <asp:Label ID="lblTenSP" runat="server" CssClass="lbl_MostTitleProduct" Text='<%# Eval("PDName") %>'
                                                                                                            Width="160px"></asp:Label></a></td>
                                                                                            </tr>
                                                                                        </table>
                                                                                        <asp:Panel ID="pnlKindNo" runat="server" Width="100%">
                                                                                            <table width="100%">
                                                                                                <tr>
                                                                                                    <td style="padding-left: 5px">
                                                                                                        <asp:Label ID="Label3" runat="server" CssClass="lbl_TitlePrice" Text="Bảo hành: "></asp:Label>
                                                                                                        <asp:Label ID="Label4" runat="server" CssClass="lbl_Properties" Text='<%# Eval("Warranty")  %>'></asp:Label>
                                                                                                        <asp:Label ID="Label3434" runat="server" CssClass="lbl_TitlePrice" Text="Tháng"></asp:Label>&nbsp;</td>
                                                                                                </tr>
                                                                                                <tr id="trPrice" runat="server">
                                                                                                    <td style="padding-left: 5px;" id="tdPrice" runat="server">
                                                                                                        <asp:Label ID="Label1" runat="server" CssClass="lbl_TitlePrice" Text="Giá: "></asp:Label>
                                                                                                        <asp:Label ID="lblDongia" runat="server" CssClass="lbl_Price" Text='<%# Eval("Price")  %>'></asp:Label>
                                                                                                        <asp:Label ID="Label6" runat="server" CssClass="lbl_Rate" Text='<%# Eval("Rate")  %>'
                                                                                                            ForeColor="Navy"></asp:Label>
                                                                                                    </td>
                                                                                                </tr>
                                                                                                <tr id="trSaleOf" runat="server" visible="false">
                                                                                                    <td style="padding-left: 5px">
                                                                                                        <asp:Label ID="Label222" runat="server" CssClass="lbl_TitlePrice" Text="Chỉ còn: "></asp:Label>
                                                                                                        <asp:Label ID="lblDiscountPrice" runat="server" CssClass="lbl_Price" Text='<%# Eval("DiscountPrice")  %>'></asp:Label>
                                                                                                        <asp:Label ID="Label923" runat="server" CssClass="lbl_Rate" Text='<%# Eval("DiscountRate")  %>'
                                                                                                            ForeColor="Navy" Font-Size="13px"></asp:Label>
                                                                                                    </td>
                                                                                                </tr>
                                                                                            </table>
                                                                                        </asp:Panel>
                                                                                    </td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td align="left" nowrap="nowrap">
                                                                                    </td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td align="left" nowrap="nowrap">
                                                                                    </td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td align="right" colspan="1" nowrap="nowrap">
                                                                                        <asp:Image ID="imgHot" runat="server" Visible="false" />
                                                                                        <asp:ImageButton runat="server" ID="btnIDetail" ImageUrl="~/Images/Icon/detail.gif" /><asp:ImageButton
                                                                                            runat="server" ID="btnISelect" ImageUrl="~/Images/Icon/buy.gif" /><asp:ImageButton
                                                                                                runat="server" ID="btnICancel" ImageUrl="~/Images/Icon/cancel.GIF" Visible="False" /></td>
                                                                                </tr>
                                                                            </table>
                                                                        </td>
                                                                        <td class="td_line-y" style="width: 2px" id="td_right" runat="server">
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="td_line-x" colspan="3">
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </ItemTemplate>
                                                        </asp:DataList>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Panel ID="pnControl" runat="server" HorizontalAlign="Center" Width="100%">
                                                        <div width="100%" align="center">
                                                            <table cellpadding="0" cellspacing="0" border="0">
                                                                <tr>
                                                                    <td colspan="2" align="center">
                                                                        <asp:Label ID="Label7" runat="server" Text="Hiển thị "></asp:Label>
                                                                        <asp:TextBox ID="txtPageSize" runat="server" CssClass="txt_Common" Height="13px"
                                                                            Width="25px" MaxLength="3"></asp:TextBox>
                                                                        <asp:Label ID="Label8" runat="server" Text="mẩu tin trên <b>1</b> trang"></asp:Label>&nbsp;<asp:Button
                                                                            ID="btnGo" runat="server" CssClass="btn_Common" Height="21px" OnClick="Button1_Click"
                                                                            Text="Go" Width="33px" /></td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:Label ID="lblDisplay" runat="server"></asp:Label>
                                                                        <asp:Label ID="lblrecordcount" runat="server" Visible="False"></asp:Label>
                                                                        <asp:Label ID="lblindex" runat="server" Visible="False">0</asp:Label>
                                                                        <asp:Label ID="lblpageSize" runat="server" Visible="False">10</asp:Label></td>
                                                                    <td>
                                                                        <asp:ImageButton ID="btnIFirst" runat="server" ImageUrl="~/Images/Icon/FirstPage.png"
                                                                            OnClick="btnIFirst_Click" /><asp:ImageButton ID="btnIPre" runat="server" ImageUrl="~/Images/Icon/PrevPage.png"
                                                                                OnClick="btnIPre_Click" /><asp:ImageButton ID="btnINext" runat="server" ImageUrl="~/Images/Icon/NextPage.png"
                                                                                    OnClick="btnINext_Click" /><asp:ImageButton ID="btnILast" runat="server" ImageUrl="~/Images/Icon/LastPage.png"
                                                                                        OnClick="btnILast_Click" />
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </div>
                                                    </asp:Panel>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td class="td_Content_Right_590">
                        </td>
                    </tr>
                    <tr>
                        <td class="td_Bottom_Left_TitileNews">
                        </td>
                        <td class="td_Bottom_Middle_TitileNews">
                        </td>
                        <td class="td_Bottom_Right_TitileNews">
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <div class='product_popup' id="divTooltip" onmouseover="OpenDivPopUpTooltip()" onmouseout="HidePopUpTooltip()"
        onclick="HidePopUpTooltip()" style="cursor: pointer">
        <table class="tbl_popup" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td class="td_Middle_L_Pop">
                            </td>
                            <td class="td_Middle_C_Pop" align="left" id="tdProductTitle">
                            </td>
                            <td class="td_Middle_R_Pop">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td nowrap="nowrap" rowspan="2" class="product_detail_popup" id="tdProductDetail"
                    style="text-align: center">
                </td>
            </tr>
        </table>
    </div>

    <script language="javascript" type="text/javascript">
  
   
     function OpenPopUpTooltip(obj)
     {       
       var tdProductDetail=document.getElementById("tdProductDetail");    
       var tdProductTitle=document.getElementById("tdProductTitle");           
       var divTooltip=document.getElementById("divTooltip");
       divTooltip.style.visibility="visible" ;
       var sleft=ObjectPosition(obj)[0];      
       var stop=ObjectPosition(obj)[1]-(divTooltip.clientHeight/2); 
       divTooltip.style.left = sleft-obj.clientWidth + 'px';
       divTooltip.style.top =  stop-obj.clientHeight+ 'px';   
      // tdProductDetail.innerHTML="<div style='padding:200 200 200 200'><img src='http://localhost:1038/WebShop/Images/Icon/loadingPD.gif' border='0'></div>";
      
       var sSrc=obj.src;

	   var Index=parseInt(sSrc.lastIndexOf("/"));
	   var iLength=parseInt(sSrc.length);
	   var filename=sSrc.substr(Index+1,iLength);

       if(filename=='Noimages.gif')
       {
            divTooltip.style.visibility="hidden" ;
            return;
       }
       var sTenSP=obj.getAttribute("TenSP");          
        tdProductTitle.innerHTML=sTenSP; 
        var img="<img src="+sSrc+">"  
          
        tdProductDetail.innerHTML=img;
      //var img="<img src="+sSrc+" width="+sWidth+" height="+sHeight+">"       
     }
     function OpenEventPopUpTooltip(e,lbl)
     { 
    
       obj=lbl.nextSibling ;
       var sSrc=obj.src;       
       var divTooltip=document.getElementById("divTooltip");
        divTooltip.style.visibility="visible" ;    
       var sleft=ObjectPosition(obj)[0];    
        var stop=ObjectPosition(obj)[1]-(divTooltip.clientHeight/2);        
      // var stop=ObjectPosition(obj)[1]-100;   
    //alert(clientHeight)
    //alert(obj.clientHeight);
       
	   var Index=parseInt(sSrc.lastIndexOf("/"));
	   var iLength=parseInt(sSrc.length);
	   var filename=sSrc.substr(Index+1,iLength);

       if(filename=='Noimages.gif')
       {
            divTooltip.style.visibility="hidden" ;
            return;
       }

        var tdProductDetail=document.getElementById("tdProductDetail");    
        var tdProductTitle=document.getElementById("tdProductTitle");           
              
        
      	var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
		if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0; 
	
		var leftPos = e.clientX + 20;
		if(leftPos<0)leftPos = 0;
        divTooltip.style.left = leftPos + 'px';
        divTooltip.style.top =  stop+ 'px';    
       // divTooltip.style.top = e.clientY + 'px';
             
        
        tdProductTitle.innerHTML=lbl.innerHTML;
       // var img="<img src="+sSrc+" width="+sWidth+" height="+sHeight+">"  
        var img="<img src="+sSrc+">";
        
        tdProductDetail.innerHTML=img;
        //divTooltip.style.top = e.clientY - obj.offsetHeight- (divTooltip.clientHeight/2) + st + 'px';
     }    
     
     function HidePopUpTooltip()
     { 
             var divTooltip=document.getElementById("divTooltip");
             divTooltip.style.visibility="hidden"
     }
     
     function OpenDivPopUpTooltip()
     { 
             var divTooltip=document.getElementById("divTooltip");
             divTooltip.style.visibility="visible"
     }
     
     
     function ObjectPosition(obj) 
     {
          var curleft = 0;
          var curtop = 0;
          if (obj.offsetParent) {
                do {
                      curleft += obj.offsetLeft;
                      curtop += obj.offsetTop;
                } while (obj = obj.offsetParent);
          }
          return [curleft,curtop];
	}
    </script>

</asp:Content>

